<template>

  <a-card :bordered='false'>
    <!-- 查询区域 -->
    <search ref='search' :config='searchConfig' @getHeight='getHeight' @search='search' />

    <!-- table区域-begin -->
    <div class='page_table'>
      <vxe-grid
        ref='xGrid'
        :border='true'
        v-bind='vexConfig'
        :align='left'
        :checkbox-config="checkboxConfig"
        :loading='loading'
        :height='pageHeight-seachHeight-90'
        :resizable='true'
        :columns='columns'
        :data='dataSource'
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        :toolbar-config='tableToolbar'
        :showOverflow='true'
        size='mini'
        @checkbox-change='selectChangeEvent'
        @checkbox-all='selectChangeEvent'
      >
        <template #toolbar_buttons>
          <div class='table-operator'>
            <a-button type="primary" @click="downExportXls('sfaWorkSummary_service')">导出</a-button>
          </div>
        </template>

        <template #pager>
          <vxe-pager
            :layouts="['Total', 'PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump','Sizes', 'FullJump']"
            :currentPage.sync='ipagination.current'
            :page-size.sync='ipagination.pageSize'
            :total='ipagination.total'
            :pageSizes='ipagination.pageSizeOptions'
            @page-change='handlePageChange'>
          </vxe-pager>
        </template>
      </vxe-grid>
    </div>
    <!-- table区域-end -->

    <!-- 表单区域 -->
    <business-log ref='businessLog'></business-log>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { PageListMixin } from '@/mixins/PageListMixin'
import JTreeSelect from '@/components/cn-form/JTreeSelect'
import Bar from '../../../components/chart/TransferBar'
import ACol from 'ant-design-vue/es/grid/Col'
import AFormItem from 'ant-design-vue/es/form/FormItem'
import JAreaLinkage from '@comp/cn-form/CnAreaLinkage'
import JDate from '@comp/cn-form/JDate'

export default {
  name: 'SfaTerminalList',
  mixins: [PageListMixin],
  components: {
    AFormItem,
    ACol,
    Bar,
    JTreeSelect,
    JAreaLinkage,
    JDate
  },
  data() {
    return {
      areaLinkage: '',
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      showImg: false,
      too: '',
      description: '工作任务',
      //查询区域
      searchConfig:[
        {
          type: 'input',
          name: 'createName',
          placeholder: '创建人'
        },
        {
          type: 'date',
          name: 'createDate',
          placeholder: '创建日期'
        },
        {
          type: 'j-select',
          name: 'type',
          placeholder: '总结类型',
          dictCode:'store_type',
        },
      ],
      // 表头
      columns: [
        { type: 'checkbox', width: 50, fixed: 'left' },
        {
          title: '创建人',
          minWidth:80,
          field: 'createName'
        },
        {
          title: '创建日期',
          minWidth:80,
          field: 'createTime'
        },
        {
          title: '类型',
          minWidth:80,
          field: 'typeStr'
        },
        {
          title: '今日总结',
          minWidth:80,
          field: 'nowText'
        },
        {
          title: '明日计划',
          minWidth:80,
          field: 'nextText'
        }
      ],
      isorter: {
        permflag: 'work_summary_page_impl'
      },
      url: {
        list: window._CONFIG['domianSfaURL'] + '/workSummary/sfaWorkSummaryController/findPageList'
        // exportXlsUrl: window._CONFIG['domianSfaURL'] + "/terminal/SfaTerminal/exportXls"
      }
    }
  },
  methods: {}
}
</script>

<style scoped>
@import '~@assets/less/common.less';
</style>